<template>
    <div>
        <div class="selectValue">
            <label class="value">
                <span class="img">
                    <img src="../../../assets/images/airIndex/energy/9.png" />
                </span>
                <span class="title">能耗排名</span>
            </label>
            <span class="rightBtn">
                <iconBorder outWidth="30px" inWidth="15px" bgColor="#D7E5FB" imgSrc="newIndex/new/1.png" marginTop="8px"></iconBorder>
                <iconBorder outWidth="30px" inWidth="15px" bgColor="#D7E5FB" imgSrc="newIndex/new/2.png" marginTop="4px"></iconBorder>
                <iconBorder outWidth="30px" inWidth="15px" bgColor="#D7E5FB" imgSrc="newIndex/new/3.png" marginTop="4px"></iconBorder>
            </span>
        </div>
        <div id="chart-container" style="padding: 0 10px 10px 10px; height: calc(100vh - 570px); margin: 0 auto">
            <el-table :data="dataList" style="width: 100%" size="small" border>
                <el-table-column prop="name" label="名称"> </el-table-column>
                <el-table-column prop="value" label="耗电量（kwh）" align="center">
                    <template slot-scope="scope"> {{ scope.row.value }} </template>
                </el-table-column>
                <el-table-column prop="bl" label="排名" align="center">
                    <template slot-scope="scope">
                        <div class="topImg">
                            <img :src="require('../../../assets/images/airIndex/no' + scope.row.bl + '.png')" />
                        </div>
                    </template>
                </el-table-column>
            </el-table>
        </div>
    </div>
</template>

<script>
import iconBorder from '@/components/newIndex/iconBorder'
export default {
    mounted() {},
    components: {
        iconBorder
    },
    data() {
        return {
            radio2: '年',
            dataList: [
                {id: 1, bl: '1', value: 125211.21, name: '阳光公寓7栋'},
                {id: 2, bl: '2', value: 125200.24, name: '阳光公寓6栋'},
                {id: 3, bl: '3', value: 124211.21, name: '阳光公寓5栋'},
                {id: 4, bl: '4', value: 123211.21, name: '阳光公寓4栋'},
                {id: 5, bl: '5', value: 122211.21, name: '阳光公寓3栋'},
                {id: 6, bl: '6', value: 121211.21, name: '阳光公寓2栋'}
            ]
        }
    },
    methods: {}
}
</script>

<style scoped lang="scss">
.topImg {
    display: flex;
    align-items: center;
    text-align: center;
    justify-content: center;
}
.rightTitle {
    text-align: center;
    height: 30px;
    line-height: 30px;
    margin-bottom: 10px;
    margin-top: 20px;
    span {
        text-align: center;
        font-weight: bold;
        font-size: 18px;
    }
    label {
        text-align: right;
        float: right;
        color: #3b8cfc;
        margin-right: 15px;
        cursor: pointer;
        font-size: 16px;
    }
    .printer {
        color: #3b8cfc;
    }
    .download {
        color: #3b8cfc;
    }
}

.selectValue {
    display: flex;
    height: 50px;
    background: #f5f5f5;
    margin: 10px;
    border-radius: 4px;
    line-height: 50px;
    .el-radio {
        margin-right: 5px;
    }
    .el-radio__label {
        padding-left: 5px;
    }
}
.selectValue .value {
    margin-left: 20px;
    font-size: 16px;

    .img {
        display: block;
        float: left;
        margin-top: 4px;
    }
    .title {
        // color: #4e66ed;
        margin-left: 10px;
    }
}
.rightBtn {
    flex: 1;
    text-align: right;
    margin-right: 20px;
    margin-top: 8px;
    div {
        margin-left: 10px;
    }
}
.selectValue .rightValue {
    flex: 1;
    text-align: right;
    margin-right: 20px;
    .btnList {
        .hover {
            border-color: #2680fa !important;
        }
        .btnItem {
            display: inline-block;
            height: 26px;
            width: 60px;
            margin-top: 7px;
            margin-left: 10px;
            line-height: 23px;
            text-align: left;
            border: 1px solid #e0e0e0;
            border-radius: 4px;
            cursor: pointer;
            &:hover {
                border-color: #2680fa;
            }
            &:first-child {
                margin-left: 0 !important;
            }
            svg {
                margin-top: 2px;
                float: left;
                margin-left: 8px;
                margin-right: 3px;
            }
            label {
                font-size: 14px;
            }
        }
    }
}
.selectValue .rightValue span {
    font-size: 16px;
    color: #666;
}
.selectValue .rightValue span b {
    font-size: 16px;
    color: #333;
}
.selectValue .rightValue span label {
    width: 10px;
    display: inline-block;
    height: 10px;
    border-radius: 10px;
    margin-left: 40px;
    margin-right: 5px;
}
</style>
